<!DOCTYPE html>
<html>
<head>
    <title>This Object Example</title>
</head>
<body>
    <script type="text/javascript">
        var name = "The Window";
        
        var object = {
            name : "My Object",
        
            getNameFunc : function(){
                return function(){
                    return this.name;
                };
            }
        };
        
        alert(object.getNameFunc()());  //"The Window"


    </script>
 
</body>
</html>
